import React from "react";
import lazyLoad from "@/routers/utils/lazyLoad";
import { LayoutIndex } from "@/routers/constant";
import { RouteObject } from "@/routers/interface";

// menu 模块
const menuRouter: Array<RouteObject> = [
	{
		element: <LayoutIndex />,
		path: "/bargain",
		permissions: ["bargainView", "catTaskView", "shopView"],
		meta: {
			title: "议价管理",
			icon: "MoneyCollectOutlined",
			sort: 7,
		},
		children: [
			{
				path: "/bargain/menu1",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu1/index"))),
				meta: {
					requiresAuth: true,
					icon: "MoneyCollectOutlined",
					title: "议价列表",
					key: "bargainView"
				}
			},
			{
				path: "/bargain/menu2",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu21/index"))),
				meta: {
					requiresAuth: true,
					icon: "MoneyCollectOutlined",
					title: "任务列表",
					key: "catTaskView"
				}
			},
			{
				path: "/bargain/menu3",
				element: lazyLoad(React.lazy(() => import("@/views/menu/menu2/menu22/menu221/index"))),
				meta: {
					requiresAuth: true,
					icon: "MoneyCollectOutlined",
					title: "平台账号",
					key: "shopView"
				}
			},
		]
	}
];

export default menuRouter;
